<%@ page contentType="text/html; charset=utf-8" import="java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%
     String linkId = request.getParameter("linkId");	
     request.setAttribute("linkId",linkId);
     String taskTitle= request.getParameter("taskTitle");
	 if(taskTitle!=null&&!taskTitle.equals("")) {
	 	 taskTitle = new String(taskTitle.getBytes("ISO-8859-1"),"UTF-8");
	 	 taskTitle = taskTitle.replaceAll("'","\\\\'");
	 	}
	 request.setAttribute("taskTitle",taskTitle);
	 String taskContent = request.getParameter("taskContent");
	 if(taskContent!=null&&!taskContent.equals("")) {
	 	taskContent = new String(request.getParameter("taskContent").getBytes("ISO-8859-1"),"UTF-8");
	 	taskContent = taskContent.replaceAll("'", "\\\\");
	 }
	 request.setAttribute("taskContent",taskContent);
	 String taskOrigin = request.getParameter("taskOrigin");
	 request.setAttribute("taskOrigin",taskOrigin);
	 String userBranchIds = request.getParameter("userBranchIds");
	 request.setAttribute("userBranchIds",userBranchIds);
	 String userBranchNames = request.getParameter("userBranchNames");
	 if ( null != userBranchNames && !"".equals(userBranchNames.trim())){
	  	userBranchNames = new String(request.getParameter("userBranchNames").getBytes("ISO-8859-1"),"UTF-8");
	 }
	 request.setAttribute("userBranchNames",userBranchNames);
	 String successUrl = request.getParameter("successUrl");
	 request.setAttribute("successUrl",successUrl);
	 String failUrl = request.getParameter("failUrl");
	 request.setAttribute("failUrl",failUrl);
	 String accessUrl = request.getParameter("accessUrl");
	 request.setAttribute("accessUrl",accessUrl);
%>
<html>
	<head>
		<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
		<title>新增任务</title>
		<link href="../resources/styles/ext-all.css" rel="stylesheet" type="text/css"/>
		<link href="../resources/styles/screen.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
		
		<script type="text/javascript" src="../resources/scripts/ext-base.js"></script>
		<script type="text/javascript" src="../resources/scripts/ext-all-debug.js"></script>
		<script type="text/javascript" src="../resources/scripts/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="../resources/scripts/ext-ux-form-DateTime.js"></script>
		<script type="text/javascript" src="../resources/scripts/utils.js"></script>
		<script type="text/javascript" src="../resources/scripts/globe.js"></script>
		<script type="text/javascript" src="../resources/scripts/FileUploadField.js"></script>
		<script type="text/javascript" src="../resources/scripts/task/task-assign-panel.js"></script>
		<script type="text/javascript" src="../resources/scripts/SuperBoxSelect.js"></script>
			<script type="text/javascript" src="../resources/scripts/sysmanager/sys-common.js"></script>
	<script type="text/javascript" src="../resources/scripts/sysmanager/group-edit2-win.js"></script>
		<script type="text/javascript" src="../resources/scripts/common/user-selector.js"></script>
		<script type="text/javascript" src="../resources/scripts/task/task-add-win.js"></script>
		<script type="text/javascript" src="../resources/scripts/task/task-view-win.js"></script>
		<script type="text/javascript" src="../resources/scripts/task/task-file-upload-panel.js"></script>
		<script type="text/javascript" src="../resources/scripts/common/user-tree.js"></script>		

		<script type="text/javascript">
		Ext.onReady(function(){
			 Ext.QuickTips.init();
			 Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
			 var win = new Task.Add.win();
			 var ob = {};
			 ob.linkId= '${linkId}';
			 ob.taskTitle = '${taskTitle}';
			 ob.taskContent = '${taskContent}';
			 ob.taskOrigin = '${taskOrigin}';
			 ob.userBranchIds = "${userBranchIds}";
			 ob.userBranchNames = "${userBranchNames}";
			 ob.successUrl = "${successUrl}";
			 ob.failUrl = "${failUrl}";
			 ob.accessUrl = "${accessUrl}";
			 win.show();
			 win.initTdAdd(ob);
		});
	</script>
    </body>
</html>
